﻿using DearlerPlatform.Domain.Entity;
using DearlerPlatform.Service.CustomerApp.Dto;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DearlerPlatform.Service.CustomerApp
{
    public partial class CustomerService 
    {
        /// <summary>
        /// 用户登录验证
        /// </summary>
        /// <param name="dto">用户dto</param>
        /// <returns>验证结果</returns>
        public async Task<bool> CheckPassword(CustomerLoginDto dto)
        {
            var res = await _customerPwdRepo.GetAsync(m => m.Customerno == dto.CustomerNo && m.Customerpwd == dto.Password);
            if (res != null)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
    }
}
